CJSON_DIR=./3rdlib/cJSON-1.7.14
SQLITE_DIR=./3rdlib/sqlite-autoconf-3350400
DS18B20_DIR=./etc/
LIBNAME=ds18b20

CFLAGS= -I ${CJSON_DIR}
CFLAGS+= -I ${SQLITE_DIR}
CFLAGS+= -I ${DS18B20_DIR}
LDFLAGS=-L ${CJSON_DIR} -lcjson
LDFLAGS+=-L ${SQLITE_DIR} -lsqlite3
cc = gcc 


all: server client

server:
	${cc} ${CFLAGS} socket_server_sqlite.c ${LDFLAGS} -o test_server

client:
	${cc} ${CFLAGS} socket_client_sqlite.c ${LDFLAGS} -o test_client

install:
	cp client ..

clean:
	rm -f test_server
	rm -f test_client
	rm -f *.o
	rm -f *.i
	rm -f lib${LIBNAME}.so
